{volist name="switchTpl" id="vo"}
{switch name="vo.tplId"}
{case value="titleTpl"}
<style>
    .layui-table-cell {
        height: auto;
        overflow: visible;
        text-overflow: inherit;
        white-space: normal;
    }
</style>
<script type="text/html" id="{$vo.tplId}">
    <div><span>{{ d.{$vo.field} }}</span></div>
</script>
{/case}

{case value="switchTpl"}
<script type="text/html" id="{$vo.tplId}">
    <input type="checkbox" name="{$vo.field}" data-href="{$vo.url}?id={{d.id}}&model={$model}&field={$vo.field}"
           value="{{d.id}}" lay-skin="switch"
           lay-text="{$vo.text}" lay-filter="switchStatus" {{ d.{$vo.field}== 1 ? 'checked' : '' }}>
</script>
{/case}
{case value="imageTpl"}
<script type="text/html" id="{$vo.tplId}">
    {{# if (d.{$vo.field}) { }}
    <img src="__ADMIN__/img/image.gif"
         onmouseover="layer.tips('<img width=150 style=\'max-length=100px\' src={{ d.{$vo.field} }}>',this,{tips: [1, '#fff'], time: 0});"
         onmouseout="layer.closeAll();">
    {{# } else { }}
    <div><span>N/A</span></div>
    {{# } }}
</script>
{/case}
{case value="imagesTpl"}
<script type="text/html" id="{$vo.tplId}">
    {{# if (d.{$vo.field}.length > 0) { }}
    {{# for(var i = 0; i < d.{$vo.field}.length; i ++) { }}
    <img src="__ADMIN__/img/image.gif"
         onmouseover="layer.tips('<img width=150 style=\'max-length=100px\' src={{ d.{$vo.field}[i] }}>',this,{tips: [1, '#fff'], time: 0});"
         onmouseout="layer.closeAll();">
    {{# } }}
    {{# } else { }}
    <div><span>N/A</span></div>
    {{# } }}
</script>
{/case}
{case value="amplifyTpl"}
<script type="text/html" id="{$vo.tplId}">
    {{# if (d.{$vo.field}) { }}
    <img style="width: 40px; height: 40px;" src="{{ d.{$vo.field} }}"
         onmouseover="layer.tips('<img width=300 style=\'max-length=100px\' src={{ d.{$vo.field} }}>',this,{tips: [1, '#fff'], time: 0});"
         onmouseout="layer.closeAll();">
    {{# } else { }}
    <div><span>N/A</span></div>
    {{# } }}
</script>
{/case}
{/switch}
{/volist}
